package com.itheima.myreflect2.Student;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @program: Myset
 * @description:
 * @author: xuejingjing
 * @create: 2021-06-15 22:15
 **/
public class CharStreamDemo11 {
    public static void main(String[] args) throws IOException {
        //字符缓冲流的特有功能
        //字符缓冲流BufferedWrite : newLine  跨平台的换行符

        //创建对象
        BufferedWriter bw = new BufferedWriter(new FileWriter("a.txt"));
        bw.write("黑马程序员 6666");
        bw.newLine();
        bw.write("aedrf");
        bw.newLine();
        bw.write("----------");

        //刷新流
        bw.flush();
        bw.close();




    }

}
